.class Lcom/waiqin365/lightapp/sku/j;
.super Landroid/os/Handler;


# instance fields
.field private a:Ljava/lang/ref/WeakReference;


# direct methods
.method public constructor <init>(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)V
    .locals 1

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/sku/j;->a:Ljava/lang/ref/WeakReference;

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 6

    const/4 v5, 0x1

    const/4 v4, 0x0

    iget-object v0, p0, Lcom/waiqin365/lightapp/sku/j;->a:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/sku/SKUCartActivity;

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->dismissProgressDialog()V

    iget v1, p1, Landroid/os/Message;->what:I

    packed-switch v1, :pswitch_data_0

    goto :goto_0

    :pswitch_0
    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v1, Lcom/waiqin365/lightapp/sku/b/a/e;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/sku/b/a/e;->b()Z

    move-result v2

    if-eqz v2, :cond_3

    const-string/jumbo v2, "1"

    iget-object v3, v1, Lcom/waiqin365/lightapp/sku/b/a/e;->b:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_3

    iget-object v2, v1, Lcom/waiqin365/lightapp/sku/b/a/e;->g:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-lez v2, :cond_0

    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v2

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->b(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/waiqin365/base/db/jxccache/f;->f(Ljava/lang/String;)Z

    iget-object v1, v1, Lcom/waiqin365/lightapp/sku/b/a/e;->g:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :goto_1
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_2

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/waiqin365/base/db/jxccache/g;

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->b(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Lcom/waiqin365/base/db/jxccache/g;->k(Ljava/lang/String;)V

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v3

    invoke-virtual {v1, v3}, Lcom/waiqin365/base/db/jxccache/g;->b(Ljava/lang/Long;)V

    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v3

    invoke-virtual {v3, v1}, Lcom/waiqin365/base/db/jxccache/f;->a(Lcom/waiqin365/base/db/jxccache/g;)J

    goto :goto_1

    :cond_2
    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->z(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)V

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->a(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)V

    goto :goto_0

    :cond_3
    iget-object v1, v1, Lcom/waiqin365/lightapp/sku/b/a/e;->c:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_4

    const v1, 0x7f0806ab

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    :cond_4
    invoke-static {v0, v1, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto :goto_0

    :pswitch_1
    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v1, Lcom/waiqin365/lightapp/sku/b/a/h;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/sku/b/a/h;->b()Z

    move-result v2

    if-eqz v2, :cond_9

    iget-object v2, v1, Lcom/waiqin365/lightapp/sku/b/a/h;->b:Ljava/lang/String;

    if-eqz v2, :cond_8

    const-string/jumbo v2, "1"

    iget-object v3, v1, Lcom/waiqin365/lightapp/sku/b/a/h;->b:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_8

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->f(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;

    move-result-object v1

    if-eqz v1, :cond_6

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->f(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;->y()I

    move-result v1

    if-lez v1, :cond_6

    new-instance v1, Lcom/waiqin365/lightapp/kehu/b/o;

    invoke-direct {v1}, Lcom/waiqin365/lightapp/kehu/b/o;-><init>()V

    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v2

    invoke-virtual {v2, v0}, Lcom/waiqin365/base/login/mainview/a;->n(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    iget-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    const-string/jumbo v3, "/fhUpload/"

    invoke-virtual {v2, v3}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_5

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v3, v1, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string/jumbo v3, "/fhUpload/"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    iput-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    :cond_5
    invoke-static {}, Lcom/waiqin365/base/login/mainview/a;->a()Lcom/waiqin365/base/login/mainview/a;

    move-result-object v2

    invoke-virtual {v2, v0}, Lcom/waiqin365/base/login/mainview/a;->k(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->b:Ljava/lang/String;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v3, "sku/"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->u(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string/jumbo v3, "/"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    iput-object v2, v1, Lcom/waiqin365/lightapp/kehu/b/o;->d:Ljava/lang/String;

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->f(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;

    move-result-object v2

    invoke-virtual {v2, v1}, Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;->a(Lcom/waiqin365/lightapp/kehu/b/o;)V

    new-instance v1, Landroid/content/Intent;

    const-string/jumbo v2, "android.intent.action.RUN"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-class v2, Lcom/fiberhome/upload/UpLoadService;

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    :cond_6
    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->A(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Z

    move-result v1

    if-eqz v1, :cond_7

    new-instance v1, Ljava/util/HashMap;

    invoke-direct {v1}, Ljava/util/HashMap;-><init>()V

    const-string/jumbo v2, "type"

    sget-object v3, Lcom/fiberhome/gaea/client/a/e;->h:Lcom/fiberhome/gaea/client/a/e;

    invoke-virtual {v1, v2, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    const-class v3, Lcom/waiqin365/lightapp/chexiao/ChexiaoSalesProcessSelectActivity;

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    const-class v3, Lcom/waiqin365/lightapp/visit/SeniorVisitProcessSelectActivity;

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    invoke-static {}, Lcom/fiberhome/gaea/client/a/b;->a()Lcom/fiberhome/gaea/client/a/b;

    move-result-object v3

    const-string/jumbo v4, "reinit_activity"

    invoke-virtual {v3, v4, v1, v2}, Lcom/fiberhome/gaea/client/a/b;->a(Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;)V

    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v1

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->b(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/base/db/jxccache/f;->h(Ljava/lang/String;)Z

    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v1

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->b(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/base/db/jxccache/f;->f(Ljava/lang/String;)Z

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->finish()V

    const v1, 0x7f040020

    const v2, 0x7f040023

    invoke-virtual {v0, v1, v2}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->overridePendingTransition(II)V

    :goto_2
    invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/UUID;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->b(Lcom/waiqin365/lightapp/sku/SKUCartActivity;Ljava/lang/String;)Ljava/lang/String;

    const v1, 0x7f08079c

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->showToast(Ljava/lang/String;)V

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->l(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Lcom/waiqin365/lightapp/view/CustomerSelectView_Vertical;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/view/CustomerSelectView_Vertical;->f()V

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->f(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;->i()V

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->t(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Landroid/widget/EditText;

    move-result-object v1

    const-string/jumbo v2, ""

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->k(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Landroid/view/View;

    move-result-object v0

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    goto/16 :goto_0

    :cond_7
    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v1

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->b(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/base/db/jxccache/f;->h(Ljava/lang/String;)Z

    invoke-static {v0}, Lcom/waiqin365/base/db/jxccache/f;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/jxccache/f;

    move-result-object v1

    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->b(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/waiqin365/base/db/jxccache/f;->f(Ljava/lang/String;)Z

    invoke-static {}, Lcom/fiberhome/gaea/client/a/b;->a()Lcom/fiberhome/gaea/client/a/b;

    move-result-object v1

    const-string/jumbo v2, "close_activity"

    const/4 v3, 0x0

    const-class v4, Lcom/waiqin365/lightapp/sku/SKUListActivity;

    invoke-virtual {v1, v2, v3, v4}, Lcom/fiberhome/gaea/client/a/b;->a(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Class;)V

    new-instance v1, Landroid/content/Intent;

    const-class v2, Lcom/waiqin365/lightapp/sku/SKUListActivity;

    invoke-direct {v1, v0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->startActivity(Landroid/content/Intent;)V

    const v1, 0x7f040022

    const v2, 0x7f040021

    invoke-virtual {v0, v1, v2}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->overridePendingTransition(II)V

    goto :goto_2

    :cond_8
    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->x(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Landroid/widget/Button;

    move-result-object v2

    invoke-virtual {v2, v5}, Landroid/widget/Button;->setEnabled(Z)V

    iget-object v1, v1, Lcom/waiqin365/lightapp/sku/b/a/h;->c:Ljava/lang/String;

    invoke-static {v0, v1, v4}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto/16 :goto_0

    :cond_9
    invoke-static {v0}, Lcom/waiqin365/lightapp/sku/SKUCartActivity;->x(Lcom/waiqin365/lightapp/sku/SKUCartActivity;)Landroid/widget/Button;

    move-result-object v2

    invoke-virtual {v2, v5}, Landroid/widget/Button;->setEnabled(Z)V

    iget v1, v1, Lcom/waiqin365/lightapp/sku/b/a/h;->a:I

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;I)V

    goto/16 :goto_0

    :pswitch_data_0
    .packed-switch 0x1001
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method
